function plot_line_scatter(combinedData,gal)
%combinedData=MF222_03022010_combinedData;
%combinedData=MF221_02182010_combinedData;
cfpIndex=3;
yfpIndex=4;
rfpIndex=5;

%MF221 03022010
%2-13: 0uM, 15-26 500uM, 28-39 5000uM, 41-52 wt
MF221_03022010_0=2:13;
MF221_03022010_500=15:26;
MF221_03022010_5K=28:39;
MF221_03022010_wt=41:52;

parameters.files=(MF221_03022010_wt);
parameters.useGate='false';

parameters.label=[];
parameters.dataIndex=yfpIndex;
parameters.label{1}='Galactose %w/v';
%parameters.label{2}='Gal3 (5000\muM Met)';
parameters.label{2}='Gal3 (wt)';
parameters.label{3}=datestr(now,30);
parameters.logBinFlag=1;
parameters.logScaleFlag=1;
parameters.xbins=10^2;
parameters.xBinRange=[-5 1];
parameters.ybins=2^8;

parameters.xplotRange=[-5.1 0.5];
parameters.yplotRange=[1.5 6];
parameters.labelFS=12;
parameters.axisFS=10;
parameters.printedXsize=7;
parameters.printedYsize=7;
parameters.print='true';
parameters.cMap=[-4 -1.25];
parameters.interpolate='true';
parameters.colorbar='false';
parameters.cbarLocation='SouthOutside';

files=parameters.files;
dataIndex=parameters.dataIndex;

fluorTotal=[];
xValsTotal=[];
combinedDataSaved=cell(length(parameters.files),1);

%imageScale attempts to properly scale the colorbar of the image based on
%how much data each histogram contains
%imageScale=fix(log(length(combinedData{files(1)}{2}(:,dataIndex))))-1

for i=1:length(files)
    if(strcmp(parameters.useGate,'true'))
        gate=combinedData{files(i)}{1}.gate.indices;
    else
        gate=logical(combinedData{files(i)}{2}(:,dataIndex));
    end
    xValsTotal=vertcat(xValsTotal,ones(length(combinedData{files(i)}{2}(gate,dataIndex)),1)*gal(files(i)));
    fluorTotal=vertcat(fluorTotal,combinedData{files(i)}{2}(gate,dataIndex));
    combinedDataSaved{i}=combinedData{files(i)}{1};
    %xValsTotal=vertcat(xValsTotal,ones(length(combinedData{files(i)}{2}(:,dataIndex)),1)*gal(files(i)));
    %fluorTotal=vertcat(fluorTotal,combinedData{files(i)}{2}(:,dataIndex));
    
end
parameters.yBinRange=[min(fluorTotal) max(fluorTotal)];
%line_histogram_scatter(1,1,50,[-5 1],2^8,[min(fluorTotal) max(fluorTotal)],xValsTotal,fluorTotal,label)
%line_histogram_scatter(1,1,10^2,[-5 1],2^8,[min(fluorTotal) max(fluorTotal)],xValsTotal,fluorTotal,label,xplotRange,yplotRange)
line_histogram_scatter(parameters,xValsTotal,fluorTotal);
%[parameters.label{3} '_outdata.mat']
if(strcmp(parameters.print,'true'))
    save([parameters.label{3} 'outdata.mat'], 'parameters', 'combinedDataSaved');
end
%line_histogram_scatter(logBinFlag,logScaleFlag,xbins,xrange,ybins,yrange,data1,data2,label,xplotRange,yplotRange)